package com.example.student.Repository;
import com.example.student.entity.Course;
import com.example.student.entity.Grade;
import com.example.student.entity.Student;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface GradeRepository extends JpaRepository<Grade, Long> {
    // 这里可以添加自定义的查询方法
    List<Grade> findByScoreBetween(Double minScore, Double maxScore);
    List<Grade> findByStudent(Student student);
    List<Grade> findByCourse(Course course);

    List<Grade> findByCourseId(Long courseId);
}